#ifndef _ML_TRAJECTORY_LOADER_H_
#define _ML_TRAJECTORY_LOADER_H_
#include "stdafx.h"
#include "MLTrajectory.h"

class CMLTrajectoryLoader
{
public:
	// Constructor and Destructor
	CMLTrajectoryLoader(void);
	~CMLTrajectoryLoader(void);

public:
	// Methods
	int  Initialize(const std::wstring& wstrFileName);
	inline void SetLoadStartPos(int nPos) { m_nStartPos = nPos; };
	inline void SetLoadEndPos(int nPos) { m_nEndPos = nPos; };

	// Trajectories
	int  Load(CMLTrajectoryCollection& trajs);
	int  Load(CMLTrajectoryCollection& trajs, int nBufSize);
	
	void Close();

private:
	// Fields
	std::wifstream m_FileStream;
	int m_nStartPos;
	int m_nEndPos;
	int m_nPos;
};


#endif
